package cn.edu.scau.cmi.dengzejun.chapter09;

import java.util.*;

public class Example9_13 {
	public static void main(String args[]) {
		String s = "you are welcome(thank you), nice to meet you .";
		StringTokenizer analysis = new StringTokenizer(s,"(),");
		int number = analysis.countTokens();
		while (analysis.hasMoreTokens()) {
			String str = analysis.nextToken();
			System.out.println(str+" ");
		}
		System.out.println("there are "+number+" same words");
		return;
	}
}
